#include <gtest/gtest.h>

#include <climits>
#include <cstddef>

#include "queue/queue.h"

class QueueTest : public ::testing::Test
{
  protected:
    void SetUp() override
    {
        // 初始化代码 (需要时)
    }
};

TEST_F(QueueTest, BasicTest)
{
    Queue<int> queue;
    queue.push(10);
    queue.push(20);

    EXPECT_FALSE(queue.empty());
    EXPECT_EQ(queue.size(), 2);

    EXPECT_EQ(queue.top(), 10);
    queue.pop();
    EXPECT_EQ(queue.top(), 20);
    queue.pop();
    EXPECT_EQ(queue.size(), 0);

    EXPECT_THROW(queue.top(), std::runtime_error);
    EXPECT_THROW(queue.pop(), std::runtime_error);
}